package com.hn658.base.message.itf;

import com.hn658.base.message.itf.dto.ItfGroupMessageRequest;
import com.hn658.base.message.itf.dto.ItfGroupResponseResult;
import com.hn658.base.message.itf.dto.ItfQueryMessageRequest;
import com.hn658.base.message.itf.dto.ItfQueryMessageResponse;
import com.hn658.base.message.itf.dto.ItfSendMessageRequest;
import com.hn658.base.message.itf.dto.ItfUserResponseResult;

/**
 * 
 * 用户服务接口
 * @author ztjie
 * @date 2015-11-2 下午2:53:14
 * @since
 * @version
 */
public interface IManagerService {

	/**
	 * 
	 * <p>用户令牌获取</p> 
	 * @author ztjie
	 * @date 2015-11-3 下午12:50:01
	 * @param appKey
	 * @param userId
	 * @param name
	 * @param portraitUri
	 * @return
	 * @see
	 */
	public ItfUserResponseResult getToken(String appKey, String userId, String name, String portraitUri);
	
	/**
	 * 更新注册用户信息
	 * @param appKey
	 * @param userId
	 * @param name
	 * @param portraitUri
	 * @return
	 */
	public ItfUserResponseResult updateAccount(String appKey,String userId,String name,String portraitUri);
	
	/**
	 * 发送mq消息
	 * @return
	 */
	public ItfUserResponseResult sendSingleMessage(ItfSendMessageRequest request);
	
	/**
	 * 创建群
	 * @param request
	 * @return
	 */
	public ItfGroupResponseResult createGroup(ItfGroupMessageRequest request);
	
	/**
	 * 加入群
	 * @param appId
	 * @param groupId
	 * @param uid
	 * @return
	 */
	public ItfGroupResponseResult joinGroup(String appId,Long groupId,String uid,String nickName);
	
	/**
	 * 修改群信息
	 * @param request
	 * @return
	 */
	public ItfGroupResponseResult modifyGroupInfo(ItfGroupMessageRequest request);
	
	/**
	 * 退群
	 * @param appId
	 * @param groupId
	 * @param uid
	 * @return
	 */
	public ItfGroupResponseResult exitGroup(String appId,Long groupId,String uid);
	
	/**
	 * 解散群
	 * @param appId
	 * @param groupId
	 * @param uid
	 * @return
	 */
	public ItfGroupResponseResult disbandGroups(String appId,Long groupId,String uid);
	/**
	 * 发送mq群消息
	 * @return
	 */
	public ItfUserResponseResult sendGroupMessage(ItfSendMessageRequest request);
	
	/**
	 * 发送系统公告
	 * @param request
	 * @return
	 */
	public ItfUserResponseResult sendSystemMessage(ItfSendMessageRequest request);
	
	/**
	 * 查询私聊消息记录
	 * @param request
	 * @return
	 */
	public ItfQueryMessageResponse queryMessage(ItfQueryMessageRequest request);
	
	/**
	 * 查询群聊消息记录
	 * @param request
	 * @return
	 */
	public ItfQueryMessageResponse queryGroupMessage(ItfQueryMessageRequest request);
	
	/**
	 * 查询群成员
	 * @param appId
	 * @param groupId
	 * @return
	 */
	public ItfGroupResponseResult queryMemberByGroup(String appId,Long groupId);
	
	/**
	 * 分页查询群成员
	 * @param appId
	 * @param groupId
	 * @param pageSize
	 * @param start
	 * @return
	 */
	public ItfGroupResponseResult queryMemberByGroup(String appId,Long groupId,Integer pageSize,Integer start);
	
	/**
	 * 查询群成员数量
	 * @param appId
	 * @param groupId
	 * @return
	 */
	public ItfGroupResponseResult numberMemberByGroup(String appId,Long groupId);
}